import request2 from '@/utils/request2'

export function getList(params) {
  return request2({
    url: '/old/news/index',
    method: 'get',
    params
  })
}

export function addNews(data) {
  return request2({
    url: '/old/news/create',
    method: 'post',
    data
  })
}
export function Upload(data) {
  return request2({
    url: '/old/news/upload',
    method: 'post',
    data
  })
}

export function delNews(id) {
  return request2({
    url: '/old/news/delete',
    method: 'get',
    params: { id: id }
  })
}

export function editNews(data) {
  return request2({
    url: '/old/news/edit',
    method: 'post',
    data
  })
}
